<?php

namespace app\Index\controller;
use think\Controller;
use \Qiniu\Auth;
use \Qiniu\Storage\UploadManager;

class Qiniu extends Controller
{
    //
    public function video(){
		// $upToken = $this->makeToken(config('my_config.qiniu.accessKey'),config('my_config.qiniu.accessKey'));
		// var_dump($upToken);
        $file=$this->request->file('video');
        var_dump($file);


    }
    // 设置鉴权token
    public function makeToken($accessKey='', $secretKey='',$bucket=''){
		// 初始化Auth状态
		$auth = new Auth($accessKey, $secretKey);
		$upToken = $auth->uploadToken($bucket);
    	return $upToken;
    }
}
